package pers.litao.bit.product.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.litao.bit.commons.utils.R;
import pers.litao.bit.product.service.UnitService;

import javax.annotation.Resource;

/**
 * @author 李涛
 * @date 2020-11-26 15:47
 */
@RestController
@RequestMapping("/product/unit")
public class UnitController {
    @Resource
    private UnitService unitService;

//    @RequestMapping("/init")
//    public R init(){
//        unitService.init();
//        return R.ok();
//    }

    /**
     * 获取单位列表
     *
     * @return
     */
    @RequestMapping("/list")
    public R  getUnitList(){
        return unitService.getUnitList();
    }
}
